<?php

if( ! defined('DOCROOT') )
{
    require_once '/var/www/advancelab/chilik2/unittest/bootstrap.php';
}

class ResultContentTest extends UnitTestCase
{
    function testingResultContentTest()
    {
        $struct = new Entity\ResultContent();
        
        $this->assertIdentical($struct,new Entity\ResultContent);
        $this->assertTrue($struct instanceof Entity\ResultContent);
        
        $struct->language = 'php';
        $this->assertEqual( 'php', $struct->language );
        $struct->type = 'ezc';
        $this->assertEqual( 'ezc', $struct->type );
        $struct->charset = 'ezp';
        $this->assertEqual( 'ezp', $struct->charset );
        $struct->encoding = 'buddymiles';
        $this->assertEqual( 'buddymiles', $struct->encoding );
        
        /* $this->dump($struct); */
    }
    
    public function testMockingMethod()
    {
        $state = array(
        'language' => 'php',
        'type' => 'ezc',
        'charset' => 'ezp',
        'encoding' => 'buddymiles',
        'disposition' => new Entity\ResultContentDisposition(),
        );
        
        $struct = Entity\ResultContent::__mock( $state );
        
        $this->assertEqual( 'php', $struct->language);
        $this->assertEqual( 'ezc', $struct->type );
        $this->assertEqual( 'ezp', $struct->charset );
        $this->assertEqual( 'buddymiles', $struct->encoding );
    }
    
}
